home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
program
/
gemxx19.zoo
/
gem++19
/
man
/
gemfw.man
< prev
next >
Wrap
Text File
|
1993-11-19
|
5KB
|
132 lines
GEM++ - C++ LIBRARIES FOR GEM/AES/VDI
NAME
GEMformwindow - a GEMwindow which has a GEMform as its contents.
DESCRIPTION
Windows under GEM can be very time consuming to handle - with
all the various events that must be handled. Also, any work done
developing window-based graphics is then difficult to reuse in
other similar applications.
Forms under GEM however, are very easy to use, hence the large
number of applications that use a dialog box (form) as the
entire user interface... which disables menus and desk accessories,
and has even worse consequences under MultiTOS (right?).
HOWEVER, with the GEMformwindow class, you get the simplicity
of a dialog box, in a window. All redraws of the window are
converted to redraws of the components of the form, and all
clicks on the window are converted to touches on the objects
in the form.
The greatest advantage that the GEMformwindow class is that you
can use all the power of GEMobjects to provide the graphics,
and any new object types you create can be used in other window
applications, simply by reusing the new GEMobjects you derive.
CONSTRUCTORS
GEMformwindow(GEMactivity& act, const GEMrsc& rsc, int RSCindex)
Create a window that contains the form specified by the given
RSC index in the given GEMrsc. The window will have a closer,
name, and mover.
GEMformwindow(GEMactivity& act, const GEMrsc& rsc, int RSCindex, int Parts)
Create a window that contains the form specified by the given
RSC index in the given GEMrsc. The window will have the given
parts (see gemfast.h from the C library). For example, the
parts could include the window sliders and resizer so that the
form could be potentially large with just a small window showing.
GEMformwindow(GEMactivity& act, const GEMformwindow&)
Create a copy of the given GEMformwindow. Data sharing will
be as described for a GEMform.
METHODS
void AlignObject(int RSCindex, int xmult=8, int ymult=1);
Some objects, especially text, redraw faster when then are byte-
or word-aligned on the screen. This method sets the alignment
for the window such that the given object is positioned at a
multiple of the given coordinates.
virtual void RedrawObject(int RSCindex)
Redraw an object in the form. Only the visible part of the
object is redrawn. Note that the method GEMobject::Redraw is
similar.
virtual void RedrawObject(int RSCindex,int Cx,int Cy,int Cw,int Ch)
As above, except the redrawing is further clipped to the given area.
virtual GEMfeedback Click(const GEMevent&)
An event handler. This method overrides GEMwindow::Click().
It handles click events to windows, behaving just like a normal
dialog box, but in a window, and with one exception:
Edits of text fields are modal in that once an editable
objected is clicked on, the text cursor appears, and editing
may occur until RETURN is pressed, or the user clicks
elsewhere. Menus, etc. are not active during editing.
This is because otherwise multiple edit cursors would be active
in multiple windows - whereas regular GEM forms only exist one
at a time.
Note that this method calls the virtual GEMform::DoItem method.
virtual void Top(const GEMevent&)
An event handler. This method overrides GEMwindow::Top(). It
handles click events that are attempting to top the window.
However, if a selectable object is at the clicked position, it
processes that click without topping the window. Clicks on
unselectable objects will simply cause the window to be topped.
virtual bool IsOpen() const;
TRUE if the window is open.
bool RubberWidth();
bool RubberHeight();
void RubberWidth(bool yes);
void RubberHeight(bool yes);
void Rubber(bool yes);
Set/get the "rubberness" of the form in the window. If a dimension
is rubber, then the form is resized (via GEMobject::Resize) when the
window changes size. Initially, a dimension is set as rubber if there
is a RESIZE part but no slider (HSLIDE/WSLIDE) for the dimension.
See also: GEMfitobject.
EXAMPLES
{
GEMapplication appl;
GEMrsc rsc("foo.rsc");
GEMactivity act;
GEMformwindow formwin(rsc,RSC_INDEX_OF_FORMWIN);
GEMalert noformwin(rsc,RSC_INDEX_OF_NOFORMWIN_ALERTBOX);
if (formwin.Created())
formwin.InActivity(act);
else
noformwin.Alert();
}
SEE ALSO
GEMform, GEMwindow, GEMobject, GEMactivity.
BUGS
Bugs in GEM++ should be reported to warwick@cs.uq.oz.au
AUTHOR
Warwick Allison, 1993.
warwick@cs.uq.oz.au
COPYING
This functionality is part of the GEM++ library,
and is Copyright 1993 by Warwick W. Allison.
GEM++ is free and protected under the GNU Library General Public
License.
You are free to copy and modify these sources, provided you
acknowledge the origin by retaining this notice, and adhere to
the conditions described in the GNU LGPL.